package com.sky.mapper.admin;
import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    /**
     * 插入数据
     * @param
     */
    @AutoFill(value = OperationType.INSERT)
    void save(Category categoryDTO);

    void deleteById(Integer id);

    List<Category> list(Integer type);

    Page<Category> page(CategoryPageQueryDTO categoryPageQueryDTO);
    /**
     * 根据id修改分类
     * @param category
     */
    @AutoFill(value = OperationType.UPDATE)
    void updateCategory(Category category);

    void ActivateAndForbiddenEmp(String status, Integer id);

}
